<?php if ( $profit->num_rows() >0 ): ?>
<div class="fenrun-income flex" >
    <div class="area-income flex-1">
       <p>已到账收入：</p>
       <span>￥<?php echo !empty($account) ? bcadd($account, 0, 2) : bcadd(0, 0, 2) ;?></span>
    </div>
    <div class="income flex-1">
        <p>未到账收入：</p>
        <span>￥<?php echo !empty($not_account) ? bcadd($not_account, 0, 2) : bcadd(0, 0, 2) ;?></span>
    </div>
</div>
<div class="fenrun-list">
    <ul class="am-cf scenic-profit-list">
        <?php $this->load->view('home/memberprofit/ajaxScenicPage'); ?>
    </ul>
</div>
<div class="scenic-profit-more sec-load am-scrollspy-init <?php echo $more ? '' : 'am-hide'; ?>">
    <i class="iconfont am-animation-spin">&#xe60b;</i>
</div>
<div class="no-more <?php echo $more ? 'am-hide' : ''; ?>">
    没有更多了
</div>
<?php endif ?>
<script>
    /*景区分页*/
    $(document).ready(function () {
        if ($('.fenrun-list').size() > 0) {
            var pg = 2;
            $('.scenic-profit-more').scrollspy({
                animation: 'fade',
                delay: 500
            });
            $('.scenic-profit-more').on('inview.scrollspy.amui', function () {
                $.ajax({
                    'type': 'get',
                    'dataType': 'json',
                    'async': false,
                    'url': hostUrl() + 'memberprofit/ajaxScenicPage/?pg=' + pg,
                    'data': $('form').serialize(),
                    'success': function (data) {
                        if (data.status) {
                            pg++;
                            $('.scenic-profit-list').append(data.html);
                            $('img.lazy').lazyload({skip_invisible: false});
                        } else {
                            $('.scenic-profit-more').addClass('am-hide');
                            $('.no-more').removeClass('am-hide');
                        }
                    }
                })
            })
        }
        /*pin 钉住*/
        $('.fenrun-income').sticky({
            top: 0
        })
    })
</script>
